package ylyhappy.com.javaguidemo.controllers

import javafx.event.ActionEvent
import javafx.fxml.FXML
import javafx.scene.control.TextArea
import javafx.scene.image.Image
import javafx.scene.image.ImageView
import javafx.scene.input.MouseEvent
import ylyhappy.com.javaguidemo.HelloApplication

class MainController {

    @FXML
    private lateinit var img1: ImageView

    @FXML
    private lateinit var img2: ImageView

    @FXML
    private lateinit var img3: ImageView

    @FXML
    private lateinit var detail: TextArea

    @FXML
    private lateinit var mainImg: ImageView


    @FXML
    fun img1(event: ActionEvent) {
        img1.visibleProperty().value = true
    }

    @FXML
    fun img2(event: ActionEvent) {
        img2.visibleProperty().value = true
    }

    @FXML
    fun img3(event: ActionEvent) {
        img3.visibleProperty().value = true
    }

    @FXML
    fun showDetail(event: MouseEvent) {
        detail.text = "这个数据分析有点东西"
    }
     @FXML
    fun onDataExclude(event: ActionEvent) {
        mainImg.image = Image(HelloApplication::class.java.getResource("img5.png").toString())
    }


    @FXML
    fun onDataNormalizationClick(event: ActionEvent) {
        mainImg.image = Image(HelloApplication::class.java.getResource("img4.png").toString())
    }

}
